<div class="panel states-info">
    <div class="panel-body" style="border-bottom:2px solid #eff0f4">
        <div class="media usr-info headimg">
            <a href="javascript:void(0);" class="pull-left clear" style="margin-top:0" class="col-lg-6 col-sm-12">
                <img class="thumb" style="border-radius:0" src="<empty name="userInfo['img_url']">__PUBLIC__/timg.jpg<else/>{$userInfo['img_url']}</empty>" alt=""/>
            </a>
            <div class="media-body col-lg-6" style="padding-left:0;padding-right:0">
                <if condition="$memberstatu eq 1">
                    <i style="display:block;line-height:27px;color:#828282;font-size:16px;font-style:normal">{$userInfo['name']}</i>
                    <i style="display:block;line-height:27px;color:#bdbdbd;font-size:14px;font-style:normal">部门 : {$indexpos}</i>
                    <i style="display:block;line-height:27px;color:#bdbdbd;font-size:14px;font-style:normal">共有员工{$totalstaff}人</i>
                <else />
                    <i style="display:block;line-height:40px;color:#828282;font-size:16px;font-style:normal">{$userInfo['name']}</i>
                    <i style="display:block;line-height:40px;color:#bdbdbd;font-size:14px;font-style:normal">部门 : {$indexpos}</i>
                </if>
            </div>
        </div>
    </div>
    <div class="panel-body" style="padding-top: 13px;padding-bottom:0">
        <if condition="$memberstatu eq 1">
            <div class="row" style="padding-bottom:13px">
                <if condition="getAccessMenu($accessList, 'Intesys', 'Employee', 'add')">
                    <div class="col-sm-6 btn-1024" data-position="bottom" data-intro="点击这里增加员工">
                        <a class="btn btn-success center-block" href="javascript:void(0);" onClick="_openWindow('{:U('Employee/add')}',800, '新增员工信息', '提交',null,'')">
                            增加员工
                        </a>
                    </div>
                </if>
                <if condition="getAccessMenu($accessList, 'Intesys', 'Member_position', 'Member_position/index')">
                    <div class="col-sm-6 btn-1024 pauseClick" data-position="bottom" data-intro="点击这里创建公司的组织管理架构，<a href='{:U('Member_position/index')}' target='_blank'>现在去创建</a>">
                        <a class="btn btn-success center-block" href="{:U('Member_position/index')}">
                            组织架构
                        </a>
                    </div>
                </if>
            </div>
        <else />
            <div class="row">
                <div class="col-lg-12" style="text-align:center;color:#828282;height:70px;padding-left:6px;padding-right:6px" id="total">
                </div>
                <div id="totalpages"></div>
                <form action="{:U('Pages_layout/total')}" id="totalform" method="post">
                    <input type="hidden" name="time" value="">
                    <input type="hidden" name="show" value="staff">
                </form>
                <div class="col-lg-12 col" style="border-top:1px solid #65cea7;padding-top:9px;padding-bottom:9px;text-align:center;cursor:pointer;color:#000" id="timecheck">
                    <span class="sp1"><span class="sp2"></span></span><!--顶部尖角-->
                    <div class="col-lg-3 col-sm-3" style="border-right:1px solid #e0e0e0;padding:0;height:33px;line-height:33px;" value="">今日</div>
                    <div class="col-lg-3 col-sm-3" style="border-right:1px solid #e0e0e0;padding:0;height:33px;line-height:33px;" value="w">本周</div>
                    <div class="col-lg-3 col-sm-3" style="border-right:1px solid #e0e0e0;padding:0;height:33px;line-height:33px;" value="m">本月</div>
                    <div class="col-lg-3 col-sm-3" style="padding:0;height:33px;line-height:33px;" value="y">本年</div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </if>
    </div>
</div>
<if condition="$memberstatu eq 1">
    <div class="panel">
        <div class="panel-heading">
            部门奖扣分情况
        </div>
        <div class="panel-body blog-post">
            <ul>
                <notempty name="addarr">
                    <volist name="addarr" id="ad">
                        <!--<i class="fa icon-angle-right"></i>-->
                        <li><a href="javascript:void(0);">{$ad.name} <span style="color:#6dc5a3;" class="pull-right">已奖:{$ad.sum} 已扣:{$ad.dsum}</span></a></li>
                    </volist>
                <else/>
                    <li style="text-align: center;list-style: none;">暂无扣分情况</li>
                </notempty>
            </ul>
        </div>
    </div>
    <div class="panel">
        <div class="panel-heading">
            本月积分排行榜 <a href="{:U('Analysis/index')}" class="pull-right"><i class="fa icon-angle-double-right" style="font-size:16px;"></i></a>
        </div>
        <div class="panel-body blog-post">
            <notempty   name="all">
                <ul style="font-size:14px">
                    <volist name="all" id="m">
                        <li title="{$m.name} {$m.pname} {$m.sum}">
                            <a href="{:U('Analysis/index')}">
                                <span style="display:inline-block;width:85%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; ">
                                    <span style="display:inline-block;width:23px;font-size:16px;text-align:center">
                                        <if condition="$m['k'] lt 4">
                                            <img src="__PUBLIC__/Intesys/AdminX/images/no{$m.k}.png" alt="">
                                            <else />
                                            {$m.k}
                                        </if>
                                    </span>
                                    <span>{$m.name}</span>
                                    <span style="font-size:11px;color:#a0a09f;" class="hidden-sm">{$m.pname}</span>
                                </span>
                                <span style="color:#6dc5a3;" class="pull-right">{$m.sum}</span>
                            </a>
                        </li>
                    </volist>
                </ul>
                <else />
                <li style="text-align: center;list-style: none;color:#837f7e;">无最新积分情况</li>
            </notempty>
        </div>
    </div>
</if>
<style>
    .onclick{color:#65cea7;}
    .sp1,.sp2
    {
        display:block;
        height:0px;
        width:0px;
        position:absolute;
        font-size:0;
        line-height:0;
    }
    .sp1
    {
        top:-3px;    /* 它的绝对值加上span的边框宽度等于div边框宽度的5倍 */
        border-top:0px;
        border-bottom:2px solid #65cea7;  /* 注意颜色的变化 */
        border-right:2px solid white;
        border-left:2px solid white;
    }
    .sp2
    {
        top:1px;  /* 是自身边框宽度的2倍 */
        left:-2px; /* 是自身边框宽度的-1倍  */
        border-top:0px;
        border-bottom:2px solid white;
        border-right:2px solid #65cea7;
        border-left:2px solid #65cea7;
    }

    @media screen and (max-width:1100px) {
        .headimg{text-align:center;}
        .clear{float: none!important;margin-right:0!important;}
        .btn-1024{padding-left:5px;padding-right:5px;}
    }
</style>
<script>
    $('#total').ajaxlist();
    $(document).ready(function(){
        //alert($('#timecheck').width()); 360
        var spleft=$('#timecheck').width()/8+13;
        var delta=$('#timecheck').width()/4-1;
//        alert(delta);
        $('.sp1').css('left',spleft+'px');

        $('#timecheck div:eq(0)').addClass('onclick');
        $('#timecheck div').each(function(){
            $(this).click(function(){
                var i = $(this).index();//序列 从1开始
                var left=spleft+(i-1)*delta;
                $('.sp1').css('left',left+'px');

                $('#timecheck div').removeClass('onclick');
                $(this).addClass('onclick');
                $('#totalform input:eq(0)').val($(this).attr('value'));
                $('#totalform').submit();
            });
        });
        $.post("{:U('Pages_layout/total')}",function(data){
            $('#total').html(data.tbody);
        },'json');
    });
</script>
